package vashion.azeroth.common.tran.transfer;

import java.util.HashMap;
import java.util.Map;

public class OrderTransfer {

	private static Map<String, Integer> disburseStatusMap = new HashMap<String, Integer>();
	private static Map<String, String> changeTypeMap = new HashMap<String, String>();
	
	static {
		disburseStatusMap.put("requesting", 0);             //申请中
		disburseStatusMap.put("agentCancel", 1);            //代理商取消
		disburseStatusMap.put("supplierRefuse", 2);         //供货商拒绝
		disburseStatusMap.put("supplierAccept", 3);         //待付款
		disburseStatusMap.put("agentPayment", 4);           //代理商已付款
		disburseStatusMap.put("supplierSend", 5);           //供货商已发货
		disburseStatusMap.put("timeOutClose", 6);           //订单超时关闭
		disburseStatusMap.put("certificateUploaded", 7);    //支付凭证已上传
		disburseStatusMap.put("certificateRefuse", 8);      //支付凭证审核不通过
		disburseStatusMap.put("all", 1000);                 //占位无实际意义 
	}
	
	static {
		changeTypeMap.put("agentOrderCancel", "agentOrderCancel");
		changeTypeMap.put("supplierRefuse", "supplierRefuse");
		changeTypeMap.put("supplierAccept", "supplierAccept");
		changeTypeMap.put("agentPayment", "agentPayment");
		changeTypeMap.put("supplierSend", "supplierSend");
	}
	
	public static Integer orderStatusTransfer(String type) {
		
		return disburseStatusMap.get(type);
	}
	
	public static String getChangeType(String type) {
		
		return changeTypeMap.get(type);
	}
	
	
}
